package com.wangxiaonan.berry.repository;

import com.wangxiaonan.berry.entity.Barn;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface BarnRepository extends JpaRepository<Barn, Integer> {

    Barn findFirstByCargoNotNullAndTypeOrderByIdDesc(String type);

    Barn findFirstByCargoNotNullOrderByIdDesc();
}
